While correct from a code point of view, the usage of the const
attribute for the domain parameter of gic_iomem_deny_access() is at
least partially bogus. Contents of the domain structure (the iomem
rangeset) is modified by the function. Such modifications succeed
because right now the iomem rangeset is allocated separately from
struct domain, and hence is not subject to the constness of struct
domain.
Amend this by dropping the const attribute from the function
parameter.
This is required by further changes that will convert
iomem_{permit,deny}_access into a function.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
gicv2_extension_dt_init(node);
}
-static int gicv2_iomem_deny_access(const struct domain *d)
+static int gicv2_iomem_deny_access(struct domain *d)
{
int rc;
unsigned long mfn, nr;
&vbase, &vsize);
}
-static int gicv3_iomem_deny_access(const struct domain *d)
+static int gicv3_iomem_deny_access(struct domain *d)
{
int rc, i;
unsigned long mfn, nr;
}
#endif
-int gic_iomem_deny_access(const struct domain *d)
+int gic_iomem_deny_access(struct domain *d)
{
return gic_hw_ops->iomem_deny_access(d);
}
/* Map extra GIC MMIO, irqs and other hw stuffs to the hardware domain. */
int (*map_hwdom_extra_mappings)(struct domain *d);
/* Deny access to GIC regions */
- int (*iomem_deny_access)(const struct domain *d);
+ int (*iomem_deny_access)(struct domain *d);
/* Handle LPIs, which require special handling */
void (*do_LPI)(unsigned int lpi);
};
#endif
int gic_map_hwdom_extra_mappings(struct domain *d);
-int gic_iomem_deny_access(const struct domain *d);
+int gic_iomem_deny_access(struct domain *d);
#endif /* __ASSEMBLY__ */
#endif